package com.ndp.fb.rdb.api;

import com.ndp.fb.model.business.vo.ectemplate.EcElementFilterParam;
import com.ndp.fb.rdb.model.EcTemplate;
import com.ndp.fb.rdb.model.EcTemplateElement;
import com.ndp.fb.rdb.model.Pager;
import com.ndp.fb.rdb.model.ectemplate.EcTemplateElementShowResult;

import java.util.List;

/**
 * Created by infi.he on 2016/4/18.
 */
public interface EcTemplateElementRdbService {

    Long save(EcTemplateElement obj);

    List<Long> batchSave(List<EcTemplateElement> list);

    EcTemplateElement findByName(String elementName, Long orgId);

    void cover(Long elementId, String imgPath, String imgPreviewPath, String elementContext);

    EcTemplateElement getEcTemplateElementByid(Long elementId);

    List<EcTemplateElement> findByIds(List<Long> ids);

    EcTemplateElement findByParentCodeAndMajor(Long wefeedid,Long templateId,String parentCode, Boolean isMajor);

    //通过样式、类型、颜色 过滤 元素
    List<EcTemplateElementShowResult> filter(EcElementFilterParam param, Long orgId, boolean isEn);

    //通过样式、类型、颜色 过滤 元素(元素库)
    List<EcTemplateElementShowResult> getAllElements(EcElementFilterParam param, Long orgId,Boolean isEn);

    void updateFillValue(String fillValue, Long id);

    void updateContext(String context, Long id);

    Integer getGroupCount(EcElementFilterParam param);

    List<EcTemplateElementShowResult> findByTemplateIdAndParentCodeAndMajorAndOrgId(Long templateId, String primaryParentCode, boolean b, Long orgId);
    EcTemplateElement findById(Long templateElementId);

    EcTemplateElementShowResult findByIdAndTemplateId(Long id, Long templateId);

}


